package asteroids.expression;
import asteroids.model.programs.*;
import asteroids.expression.BooleanComparator.Compatibility;



public class NotEqual extends BooleanComparator {

	public NotEqual(Expression left, Expression right) {
		super(left,right);
	}
	
	@Override
	public boolean getValue(Program program){
			this.updateArguments(program);
		if(this.comp==Compatibility.NONE){
			return false;
		}else if(this.comp==Compatibility.NUMERIC){
			return (((NumericExpression)outArg1).getValue(program) != ((NumericExpression)outArg2).getValue(program));
		}else {
			return (((EntityExpression)outArg1).getValue(program) != ((EntityExpression)outArg2).getValue(program));
		}
	}
}
	
	
